using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using FiltronASP.Models;

namespace FiltronASP.Areas.Admin.ViewModels.Users
{
    /// <summary>
    /// ViewModel dla akcji <code>Create</code>, <code>Edit</code>, <code>Delete</code> stron.
    /// </summary>
    public class UsersEditionViewModel : BaseViewModel
    {
        /// <summary>
        /// encja, ktora edytujemy lub dodajemy
        /// </summary>
        public User UserToOperateWith { get; set; }

        /// <summary>
        /// Biezaca strona paginacji.
        /// </summary>
        public int PaginationPage { get; set; }

        /// <summary>
        /// Haslo.
        /// </summary>
        public String password { get; set; }

        /// <summary>
        /// Potwierdzenie hasla.
        /// </summary>
        public String confirmPassword { get; set; }

        /// <summary>
        /// login.
        /// </summary>
        public String login { get; set; }

        /// <summary>
        /// Konstruktor.
        /// </summary>
        public UsersEditionViewModel()
            : base()
        {
        }

        /// <summary>
        /// Konstruktor.
        /// </summary>
        /// <param name="languagesToDropDown">lista jezykow do drop downa</param>
        /// <param name="pageTypesInMenu">lista grup stron do menu z lewej</param>
        /// <param name="currentLanguage">wersja jezykowa</param>
        /// <param name="menusInMenu">lista menu w menu</param>
        /// <param name="userToOperateWith">encja, ktora edytujemy</param>
        /// <param name="paginationPage">biezaca strona paginacji</param>
        public UsersEditionViewModel(IQueryable<Language> languagesToDropDown,
            IQueryable<PageType> pageTypesInMenu, IQueryable<Menu> menusInMenu,
            Language currentLanguage,
            User userToOperateWith,
            String login,
            int paginationPage)
            : base(languagesToDropDown, pageTypesInMenu, menusInMenu, currentLanguage)
        {
            this.UserToOperateWith = userToOperateWith;
            this.PaginationPage = paginationPage;
            this.password = "";
            this.confirmPassword = "";
            this.login = login;
        }

        /// <summary>
        /// Konstruktor.
        /// </summary>
        /// <param name="languagesToDropDown">lista jezykow do drop downa</param>
        /// <param name="pageTypesInMenu">lista grup stron do menu z lewej</param>
        /// <param name="currentLanguage">wersja jezykowa</param>
        /// <param name="menusInMenu">lista menu w menu</param>
        /// <param name="userToOperateWith">encja, ktora edytujemy</param>
        /// <param name="paginationPage">biezaca strona paginacji</param>
        public UsersEditionViewModel(IQueryable<Language> languagesToDropDown,
            IQueryable<PageType> pageTypesInMenu, IQueryable<Menu> menusInMenu, 
            Language currentLanguage,             
            User userToOperateWith,
            int paginationPage) 
            : base(languagesToDropDown, pageTypesInMenu, menusInMenu, currentLanguage)           
        {
            this.UserToOperateWith = userToOperateWith;
            this.PaginationPage = paginationPage;
            this.password = "";
            this.confirmPassword = "";
            this.login = "";
        }

        /// <summary>
        /// Konstruktor.
        /// </summary>
        /// <param name="languagesToDropDown">lista jezykow do drop downa</param>
        /// <param name="pageTypesInMenu">lista grup stron do menu z lewej</param>
        /// <param name="currentLanguage">wersja jezykowa</param>
        /// <param name="menusInMenu">lista menu w menu</param>
        /// <param name="userToOperateWith">encja, ktora edytujemy</param>
        /// <param name="paginationPage">biezaca strona paginacji</param>
        /// <param name="password">haslo</param>
        /// <param name="confirmPassword">haslo</param>
        public UsersEditionViewModel(IQueryable<Language> languagesToDropDown,
            IQueryable<PageType> pageTypesInMenu, IQueryable<Menu> menusInMenu,
            Language currentLanguage,
            User userToOperateWith,
            int paginationPage,
            String password,
            String confirmPassword)
            : base(languagesToDropDown, pageTypesInMenu, menusInMenu, currentLanguage)
        {
            this.UserToOperateWith = userToOperateWith;
            this.PaginationPage = paginationPage;
            this.password = password;
            this.confirmPassword = confirmPassword;
        }

    }
}
